package com.sq.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author hxh
 * @since 2024-09-06
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user")
@Schema(name = "User", description = "")
public class User extends Model<User> {

    @Schema(description = "主键id自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @Schema(description = "修改时间")
    @TableField("update_time")
    private Date updateTime;

    @Schema(description = "逻辑删除")
    @TableField("is_deleted")
    private Byte isDeleted;

    @Schema(description = "头像")
    @TableField("avatar")
    private String avatar;

    @Schema(description = "真实姓名")
    @TableField("real_name")
    private String realName;

    @Schema(description = "用户账号")
    @TableField("username")
    private String username;

    @Schema(description = "用户密码")
    @TableField("password")
    private String password;

    @Schema(description = "用户电话")
    @TableField("mobile")
    private String mobile;

    @Schema(description = "用户余额")
    @TableField("money")
    private BigDecimal money;

    @Schema(description = "加密盐巴")
    @TableField("salt")
    private String salt;

    @Schema(description = "是否禁用: [0=否, 1=是]")
    @TableField("is_disable")
    private Byte isDisable;

    @Schema(description = "是否假人【0否1是】")
    @TableField("is_dummy")
    private Integer isDummy;

    @Schema(description = "最后登录IP")
    @TableField("last_login_ip")
    private String lastLoginIp;

    @Schema(description = "最后登录时间")
    @TableField("last_login_time")
    private Integer lastLoginTime;

    @Schema(description = "邀请码")
    @TableField("invite_code")
    private String inviteCode;

    @Schema(description = "会员等级id")
    @TableField("level_id")
    private Integer levelId;

    @Schema(description = "交易密码")
    @TableField("transaction_password")
    private String transactionPassword;

    @Schema(description = "交易密码加密盐巴")
    @TableField("transaction_sale")
    private String transactionSale;

    @Schema(description = "用户充值金额")
    @TableField("user_recharge")
    private BigDecimal userRecharge;

    @Schema(description = "用户佣金")
    @TableField("user_ratio")
    private BigDecimal userRatio;

    @Schema(description = "用户提现金额")
    @TableField("user_withdraw")
    private BigDecimal userWithdraw;

    @Schema(description = "注册IP")
    @TableField("register_ip")
    private String registerIp;

    @Schema(description = "注册地址")
    @TableField("register_address")
    private String registerAddress;

    @Schema(description = "冻结余额")
    @TableField("freeze_money")
    private BigDecimal freezeMoney;

    @Schema(description = "投资总额")
    @TableField("user_invest")
    private BigDecimal userInvest;

    @Schema(description = "代收利息")
    @TableField("wait_interest")
    private BigDecimal waitInterest;

    @Schema(description = "代收本金")
    @TableField("wait_principal")
    private BigDecimal waitPrincipal;

    @Schema(description = "余额宝")
    @TableField("yu_e_bao")
    private BigDecimal yuEBao;

    @TableField("yuebao")
    private BigDecimal yuebao;

    @Schema(description = "代理id-后台管理账户id")
    @TableField("admin_id")
    private Integer adminId;

    @Schema(description = "上级id")
    @TableField("parent_id")
    private Integer parentId;

    @Schema(description = "上级类型0:上级是会员1:上级是代理")
    @TableField("parent_type")
    private Integer parentType;

    @Schema(description = "累计彩金")
    @TableField("bonus")
    private BigDecimal bonus;

    @Schema(description = "身份证号码")
    @TableField("id_number")
    private String idNumber;

    @Schema(description = "是否实名认证: 0=否, 1=是")
    @TableField("is_real_auth")
    private Integer isRealAuth;

    @Schema(description = "经验值")
    @TableField("experience_value")
    private Integer experienceValue;

    @Schema(description = "是否充值(0:否1:是)")
    @TableField("is_recharge")
    private Integer isRecharge;

    @Schema(description = "是否提现(0:否1:是)")
    @TableField("is_withdrawal")
    private Integer isWithdrawal;

    @Schema(description = "最后登录IP地址")
    @TableField("last_login_address")
    private String lastLoginAddress;

    @Schema(description = "限制购买：0不限制1限制")
    @TableField("limit_buy")
    private Integer limitBuy;

    @Schema(description = "积分")
    @TableField("integral")
    private Integer integral;

    @Schema(description = "是否限制消费:0否；1是")
    @TableField("is_limit")
    private Integer isLimit;

    @Schema(description = "冻仓金额")
    @TableField("limit_money")
    private BigDecimal limitMoney;

    @Schema(description = "是否手机验证过：0否1是")
    @TableField("phone_validate")
    private Integer phoneValidate;

    @Schema(description = "盲盒次数")
    @TableField("blind_count")
    private Integer blindCount;

    @Schema(description = "红包次数")
    @TableField("user_red")
    private Integer userRed;

    @Schema(description = "佣金")
    @TableField("commission")
    private BigDecimal commission;

    @Schema(description = "已提现佣金")
    @TableField("withdrawal_commission")
    private BigDecimal withdrawalCommission;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
